package com.example.demo.admin.gecco.crawler;/**
 * Created by kete on 2017-11-07.
 */

import com.example.demo.admin.gecco.entity.XichiIpProxyInfo;
import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

/**
 * 作者：kete
 * 创建时间：2017-11-07 15:29
 * 功能描述：
 * 版本：
 */
@Gecco(matchUrl = "http://www.xicidaili.com/nn/{pageIndex}", pipelines = {"xichiSaveInfoPipeline" },timeout = 10*1000)
public class XichiPage implements HtmlBean {

    @Request
    private HttpRequest request;

    @RequestParameter
    private Integer pageIndex;

    @HtmlField(cssPath = "tbody tr:gt(0)")
    List<XichiIpProxyInfo> list;

    @Href
    @HtmlField(cssPath = ".pagination .next_page")
    String nextUrl;


    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public List<XichiIpProxyInfo> getList() {
        return list;
    }

    public void setList(List<XichiIpProxyInfo> list) {
        this.list = list;
    }

    public String getNextUrl() {
        return nextUrl;
    }

    public void setNextUrl(String nextUrl) {
        this.nextUrl = nextUrl;
    }
}
